package com.hiultra.archive.service.impl;

import java.util.List;
import com.hiultra.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hiultra.archive.mapper.ArcDestroyDetailMapper;
import com.hiultra.archive.domain.ArcDestroyDetail;
import com.hiultra.archive.service.IArcDestroyDetailService;

/**
 * 销毁详情Service业务层处理
 * 
 * @author ls
 * @date 2023-09-02
 */
@Service
public class ArcDestroyDetailServiceImpl implements IArcDestroyDetailService 
{
    @Autowired
    private ArcDestroyDetailMapper arcDestroyDetailMapper;

    /**
     * 查询销毁详情
     * 
     * @param destroyDetailId 销毁详情主键
     * @return 销毁详情
     */
    @Override
    public ArcDestroyDetail selectArcDestroyDetailByDestroyDetailId(Long destroyDetailId)
    {
        return arcDestroyDetailMapper.selectArcDestroyDetailByDestroyDetailId(destroyDetailId);
    }

    /**
     * 查询销毁详情列表
     * 
     * @param arcDestroyDetail 销毁详情
     * @return 销毁详情
     */
    @Override
    public List<ArcDestroyDetail> selectArcDestroyDetailList(ArcDestroyDetail arcDestroyDetail)
    {
        return arcDestroyDetailMapper.selectArcDestroyDetailList(arcDestroyDetail);
    }

    /**
     * 新增销毁详情
     * 
     * @param arcDestroyDetail 销毁详情
     * @return 结果
     */
    @Override
    public int insertArcDestroyDetail(ArcDestroyDetail arcDestroyDetail)
    {
        arcDestroyDetail.setCreateTime(DateUtils.getNowDate());
        return arcDestroyDetailMapper.insertArcDestroyDetail(arcDestroyDetail);
    }

    /**
     * 修改销毁详情
     * 
     * @param arcDestroyDetail 销毁详情
     * @return 结果
     */
    @Override
    public int updateArcDestroyDetail(ArcDestroyDetail arcDestroyDetail)
    {
        arcDestroyDetail.setUpdateTime(DateUtils.getNowDate());
        return arcDestroyDetailMapper.updateArcDestroyDetail(arcDestroyDetail);
    }

    /**
     * 批量删除销毁详情
     * 
     * @param destroyDetailIds 需要删除的销毁详情主键
     * @return 结果
     */
    @Override
    public int deleteArcDestroyDetailByDestroyDetailIds(Long[] destroyDetailIds)
    {
        return arcDestroyDetailMapper.deleteArcDestroyDetailByDestroyDetailIds(destroyDetailIds);
    }

    /**
     * 删除销毁详情信息
     * 
     * @param destroyDetailId 销毁详情主键
     * @return 结果
     */
    @Override
    public int deleteArcDestroyDetailByDestroyDetailId(Long destroyDetailId)
    {
        return arcDestroyDetailMapper.deleteArcDestroyDetailByDestroyDetailId(destroyDetailId);
    }
}
